<template>
	<view class="c-wrap">
		<view class="c-block">
			<view class="c-title">{{$t('clogin.label.userlog_usertype')}}</view>
			<view class="c-content">{{$t('clogin.dict.cloginuserlog_'+sr.data.usertype)}}</view>
			<view class="c-title">{{$t('clogin.label.userlog_content')}}</view>
			<view class="c-content">{{sr.data.content}}</view>
			<view class="c-title">{{$t('clogin.label.userlog_ip')}}</view>
			<view class="c-content">{{sr.data.ip}}</view>
			<view class="c-title">{{$t('clogin.label.userlog_ismobile')}}</view>
			<view class="c-content">{{$t('ccore.dict.'+sr.data.ismobile)}}</view>		
			<view class="c-title">{{$t('clogin.label.userlog_useragent')}}</view>
			<view class="c-content">{{sr.data.useragent}}</view>
			<view class="c-title">{{$t('ccore.label.createtime')}}<!-- 操作时间 --></view>
			<view class="c-content">{{$u.timeFormat(sr.data.createtime, 'yyyy/mm/dd hh:MM:ss')}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				options: null,
				sp: {
					id:null
				},
				param: {

				},
				sr: {
					data: []
				}
			}
		},
		onLoad(options) {
			let that = this;
			that.options = options;
			that.sp.id = options.id;
			uni.setNavigationBarTitle({
				title: ""
			})
			uni.setNavigationBarTitle({
				title: that.$t('clogin.label.cloginuserloglist')
			})
		},
		onShow() {
			let that = this;
			that.cinit();
		},
		methods: {
			cinit() {
				let that = this;
				that._initPage(false, true);
				return;
			},
			_initPage(isForceDisplay, isRefresh) {
				let that = this;
				that.$u.c.ajaxget('csmwj/cloginuser/pagecloginuserlogdetail', {
					id: that.sp.id
				}, function(res) {
					that.sr.data = res.data;
				});
			},
		}
	}
</script>

<style lang="scss">

</style>
